<?php
/*
 *  Auteur: DikkeHein <Clemens Wijnekus>
 */

//if ($actiepunten->num_rows() > 0) : 
?>

<section id="main" class="column">

    <article class="module width_full">
        <header><h3 class="tabs_involved">Not Done Actiepunten</h3></header>
        <div class="tab_container">
            <table class="tablesorter" cellspacing="0"> 
                <thead> 
                    <tr> 
                        <th></th> 
                        <th>AP Nummer</th> 
                        <th>Beschrijving</th> 
                        <th>Staffers</th>
                        <th>Deadline</th>
                        <th>Aangemaakt</th>
                        <th colspan="3">Acties</th> 
                    </tr> 
                </thead> 
                <tbody>
                    <?php foreach ($actiepunten as $row) : ?>
                        <?php if (!$row['status']) : $gebrs = ""; ?>
                            <tr> 
                                <td><input type="checkbox"></td> 
                                <td><?php echo $row['id_ap']; ?></td> 
                                <td><?php echo $row['beschrijving']; ?></td>
                                <td>
                                    <?php foreach ($row['gebruikers'] as $gebr) : ?>
                                        <?php $gebrs .= $gebr . " "; ?>
                                    <?php endforeach; ?>
                                    <?php echo $gebrs; ?>
                                </td>
                                <td><?php echo $row['deadline']; ?></td> 
                                <td><?php echo $row['aangemaakt']; ?></td>
                                <td><?php echo anchor('actiepunten/check/' . $row['id_ap'], img('images/icn_alert_success.png')) . " "; ?> </td> 
                                <td><?php echo anchor('actiepunten/wijzigen/' . $row['id_ap'], img('images/icn_edit.png')) . "  "; ?></td>
                                <td><?php echo anchor('actiepunten/verwijderen/' . $row['id_ap'], img('images/icn_trash.png')); ?></td>
                            </tr>
                        <?php endif; ?>
                    <?php endforeach; ?>
                </tbody> 
            </table>
        </div><!-- end of Not Done AP -->
    </article><!-- end of messages article -->
    <div class="clear"></div>
    <div class="spacer"></div>
    <article class="module width_full">
        <header><h3 class="tabs_involved">Done Actiepunten</h3></header>
        <div class="tab_container">
            <table class="tablesorter" cellspacing="0"> 
                <thead> 
                    <tr> 
                        <th></th> 
                        <th>AP Nummer</th> 
                        <th>Beschrijving</th> 
                        <th>Staffers</th>
                        <th>Deadline</th>
                        <th>Aangemaakt</th>
                        <th colspan="3">Actions</th> 
                    </tr> 
                </thead> 
                <tbody>
                    <?php foreach ($actiepunten as $row) : ?>
                        <?php if ($row['status']) : $gebrs = ""; ?>
                            <tr> 
                                <td><input type="checkbox"></td> 
                                <td><?php echo $row['id_ap']; ?></td> 
                                <td><?php echo $row['beschrijving']; ?></td>
                                <td>
                                    <?php foreach ($row['gebruikers'] as $gebr) : ?>
                                        <?php $gebrs .= $gebr . " "; ?>
                                    <?php endforeach; ?>
                                    <?php echo $gebrs; ?>
                                </td>
                                <td><?php echo $row['deadline']; ?></td> 
                                <td><?php echo $row['aangemaakt']; ?></td>
                                <td><?php echo anchor('actiepunten/uncheck/' . $row['id_ap'], img('images/icn_logout.png')) . " "; ?> </td> 
                                <td><?php echo anchor('actiepunten/wijzigen/' . $row['id_ap'], img('images/icn_edit.png')) . "  "; ?></td>
                                <td><?php echo anchor('actiepunten/verwijderen/' . $row['id_ap'], img('images/icn_trash.png')); ?></td> 
                            </tr>
                        <?php endif; ?>
                    <?php endforeach; ?>
                </tbody> 
            </table>
        </div><!-- end of Done AP -->
    </article><!-- end of messages article -->
</section>